{{- if .Values.data.stateful.enabled }}
apiVersion: v1
kind: Service
metadata:
  name: {{ template "name" . }}-data
  labels:
    app: {{ template "name" . }}
    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
    release: "{{ .Release.Name }}"
    heritage: "{{ .Release.Service }}"
    component: {{ template "name" . }}
    role: data
spec:
  ports:
  - port: 9300
    name: transport
  clusterIP: None
  selector:
    component: {{ template "name" . }}
    role: data
{{- end }}
